<!-- 新建实物奖品 -->
<template>
    <!-- <a-drawer v-model:visible="vdata.visible" :maskClosable="false" width="40%"> -->
      <!-- <a-form
        ref="formRef"
        :model="vdata.saveObject"
        layout="vertical"
        labelAlign="left"
        :rules="vdata.rules"
        :colon="false"
        :wrapper-col="{ span: 22 }"
        style="margin-top: 30px; margin-left: 20px"
      > -->
        <a-row>
            <a-col :span="12">
            <a-form-item label="机构" name="agentNo">
              <GzTreeSelect ref="gzThreeRef" v-model:value="vdata.saveObject['agentNo']" :disabled="!vdata.isAdd" />
            </a-form-item>
          </a-col>
          <!-- <a-col :span="12">
            <a-form-item label="机构" name="agentNo">
              <GzTreeSelect ref="gzThreeRef" v-model:value="vdata.saveObject['agentNo']" :disabled="!vdata.isAdd" />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="选择内部商品" name="virtualInsideId">
              <a-select
                ref="select"
                v-model:value="vdata.saveObject['virtualInsideId']"
                style="width: 100%"
                @focus="focus"
                @change="handleChange"
              > 
                <a-select-option v-for="(item, index) in ruleListProduct" :key="index" :lable="item.goodsName " :value="item.virtualInsideId">
                  {{ item.goodsName }}
                </a-select-option>
              </a-select>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="数量" name="goodsNum">
              <a-input-number
                v-model:value="vdata.saveObject['goodsNum']"
                :min="vdata.minVirtualCouponNum"
                placeholder="数量"
                style="width: 100%;"
              />
            </a-form-item>
          </a-col>
          <a-col :span="24">
            <a-form-item label="发放客户限制" name="isLimitUser">
              <a-radio-group v-model:value="vdata.saveObject.isLimitUser" :disabled="vdata.disabled">
                <a-radio :value="0">不限制</a-radio>
                <a-radio :value="1">实名客户</a-radio>
                <a-radio :value="2">月资产等级客户</a-radio>
                <a-radio :value="3">季资产等级客户</a-radio>
              </a-radio-group>
            </a-form-item>
          </a-col>
          <a-col v-if="vdata.saveObject.isLimitUser == 2||vdata.saveObject.isLimitUser==3" :span="24">
            <a-form-item label="发放客户等级限制" name="limitUserContent" :wrapper-col="{ span: 24 }">
              <a-checkbox-group v-model:value="vdata.saveObject['limitUserContent']" :disabled="vdata.disabled" style="width: 100%">
                <a-row>
                  <a-col :span="6">
                    <a-checkbox :value="0">价值</a-checkbox>
                  </a-col>
                  <a-col :span="6">
                    <a-checkbox :value="1">金桂</a-checkbox>
                  </a-col>
                  <a-col :span="6">
                    <a-checkbox :value="2">富嘉</a-checkbox>
                  </a-col>
                  <a-col :span="6">
                    <a-checkbox :value="3">钻石</a-checkbox>
                  </a-col>
                  <a-col :span="6">
                    <a-checkbox :value="4">鼎福</a-checkbox>
                  </a-col>
                </a-row>
              </a-checkbox-group>
            </a-form-item>
          </a-col> -->
  
          <!-- <a-col :span="12">
            <a-form-item label="预算金额（元）" name="virtualCouponAmount">
              <a-input-number v-model:value="vdata.saveObject['virtualCouponAmount']" :disabled="vdata.disabled"
                style="width: 100%" min="0" placeholder="请输入预算金额" />
            </a-form-item>
          </a-col> -->
        </a-row>
        <!-- <a-row>
          <a-col :span="24">
            <a-form-item :labelCol="{ span: 3 }" label="规则" name="ruleList">
              <div class="rule" v-for="(item,index) in vdata['ruleList']">
                <span>规则名</span>
                <a-input style="width: 180px;" :disabled="vdata.disabled" v-model:value="vdata['ruleList'][index].k" placeholder="规则名" />
                <span>规则内容</span>
                <a-input style="width: 180px;" v-model:value="vdata['ruleList'][index].v" placeholder="规则内容" :disabled="vdata.disabled"/>
                <plus-circle-outlined v-if="vdata['ruleList'].length == index+1" class="fz18 cp" @click="ruleAdd"/>
                <minus-circle-outlined v-if="vdata['ruleList'].length == index+1 && vdata['ruleList'].length > 1" class="fz18 cp" @click="ruleReduce"/>
              </div>
            </a-form-item>
          </a-col>
        </a-row> -->
      <!-- </a-form> -->
      <!-- <div class="drawer-btn-center">
        <a-button :style="{ marginRight: '8px' }" style="margin-right: 8px" @click="onClose">
          <close-outlined />
          取消
        </a-button>
        <a-button type="primary" :loading="vdata.btnLoading" @click="handleOkFunc(false)">
          <check-outlined />
          保存
        </a-button>
      </div> -->
    <!-- </a-drawer> -->
  </template>
  
  <script setup lang="ts">
    import { reactive, ref, defineExpose, watch, getCurrentInstance } from 'vue'
    const { $infoBox, $access } = getCurrentInstance()!.appContext.config.globalProperties
    
  
  defineExpose({
    
  })
  </script>
  
  <style lang="less" scoped>
  .rule {
    display: flex;
    align-items: center;
    gap: 20px;
  
    * {
      flex-shrink: 0;
    }
  
    &:nth-child(n + 2) {
      margin-top: 10px;
    }
  }
  
  .cp {
    cursor: pointer;
  }
  
  .fz18 {
    font-size: 18px;
  }
  </style>
  